/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package search2;

import env.Action;

/**
 *
 * @author user
 */
class AutomatonAI {

    
    static Action nextMove(AgentState sentryState) {
        switch (sentryState.getOrientation()) {
            case North: 
            case South: return Action.right;
            case West: 
            case East: 
                AgentState fwd=sentryState.clone(Action.fwd);
                if(fwd.getTile().isWall())
                    return Action.right;
                else 
                    return Action.fwd;
        }
        return null;
    }
    
 
}
